import FilterCard from "@/pages/components/FilterCard/index";
import TableCard from "./components/TableCard";
import type { FilterFormItemType, ValueType } from "@/pages/components/FilterCard/types/index.type";

const filterFormList: FilterFormItemType[] = [
  { label: "角色名称", name: "rolename", type: "input" },
  {
    label: "是否启用",
    name: "isEnable",
    type: "select",
    options: [
      { label: "是", value: 1 },
      { label: "否", value: 0 },
    ],
  },
  { label: "创建人", name: "createBy", type: "input" },
  { label: "创建时间", name: "createTime", type: "rangePicker" },
];
const onFilterCardFinish = (value: ValueType) => {
  console.log("🚀 ~ onFinish ~ value:", value);
};
const onFilterCardReset = () => {
  console.log("🚀 ~ onReset");
};

const Role = () => {
  return (
    <div>
      <FilterCard filterFormList={filterFormList} onFinish={onFilterCardFinish} onReset={onFilterCardReset} />
      <TableCard />
    </div>
  );
};

export default Role;
